CC := icpc
Include_file := -I/usr/local/include/blitz/
Library_file := -L/usr/local/lib/
CFLAGS :=  $(Include_file) ${Library_file} -lfftw3 -lm -lblitz
objects := main.o distribution.o density.o Poisson1D.o electric.o load.o rk4_fixed.o rhs_eval.o unload.o output2.o output3.o


pic1d : $(objects)
	$(CC) -o pic1d ${objects} ${CFLAGS}

main.o : mine.h
	$(CC)  -c main.cpp
distribution.o : mine.h
	$(CC)  -c distribution.cpp
density.o : mine.h
	$(CC)  -c density.cpp
Poisson1D.o : mine.h
	$(CC)  -c Poisson1D.cpp
electric.o : mine.h
	$(CC)  -c electric.cpp
load.o : mine.h
	$(CC)  -c load.cpp
rk4_fixed.o : mine.h
	$(CC)  -c rk4_fixed.cpp
rhs_eval.o : mine.h
	$(CC)  -c rhs_eval.cpp
unload.o : mine.h
	$(CC)  -c unload.cpp
output2.o : mine.h
	$(CC)  -c output2.cpp
output3.o : mine.h
	$(CC)  -c output3.cpp


.PHONY : clean
clean:
	rm -f *.o